﻿Shader "MyShader/01 basic shader"{

	//属性
	Properties{
		//属性名（显示名,类型）= rgba
		_Color("Color",Color) = (1,1,1,1)		//float4
		_Vector("Vector",Vector) = (1,2,3,4)	//float4
		_Int("Int",Int) = 34234					//float
		_Float("Float",Float) = 4.5				//float
		_Range("Range",Range(1,11)) = 6			//float
		_2D("Texture",2D) = "red"{}				//sampler2D
		_Cube("Cube",Cube) = "white"{}			//samplerCube
		_3D("Texure",3D) = "black"{}			//sampler3D
	}

	//适配显卡运行效果（多个）
	SubShader{
		Pass{
			//shader代码
			CGPROGRAM
			float4 _Color;
			float4 _Vector;
			float _Int;
			float _Float;
			float _Range;
			sampler2D _2D;
			samplerCube _Cube;
			sampler3D _3D;

			ENDCG
		}
	}

	Fallback "VertexLit"
}